package com.wechatpay.v3.sdk.data;

import java.io.Serializable;

/**
 * 微信支付回调加密数据
 *
 * @author liuyi <liuy@pvc123.com>
 * @since 2021/8/9
 */
public class WechatPayCallBackEncryptData implements Serializable {

    /** 通知id */
    private String id;

    /** 通知创建时间 */
    private String create_time;

    /** 通知类型 */
    private String event_type;

    /** 通知数据类型 */
    private String resource_type;

    /** 通知资源数据 */
    private Resource resource;

    /** 回调摘要 */
    private String summary;

    public String getId() {
        return id;
    }

    public WechatPayCallBackEncryptData setId(String id) {
        this.id = id;
        return this;
    }

    public String getCreate_time() {
        return create_time;
    }

    public WechatPayCallBackEncryptData setCreate_time(String create_time) {
        this.create_time = create_time;
        return this;
    }

    public String getEvent_type() {
        return event_type;
    }

    public WechatPayCallBackEncryptData setEvent_type(String event_type) {
        this.event_type = event_type;
        return this;
    }

    public String getResource_type() {
        return resource_type;
    }

    public WechatPayCallBackEncryptData setResource_type(String resource_type) {
        this.resource_type = resource_type;
        return this;
    }

    public Resource getResource() {
        return resource;
    }

    public WechatPayCallBackEncryptData setResource(Resource resource) {
        this.resource = resource;
        return this;
    }

    public String getSummary() {
        return summary;
    }

    public WechatPayCallBackEncryptData setSummary(String summary) {
        this.summary = summary;
        return this;
    }

    public static class Resource {
        /** 加密算法类型 */
        private String algorithm;
        /** 数据密文 */
        private String ciphertext;
        /** 加密使用的随机串  */
        private String nonce;
        /** 原始回调类型，为transaction  */
        private String original_type;
        /** 附加数据 */
        private String associated_data;

        public String getAlgorithm() {
            return algorithm;
        }

        public Resource setAlgorithm(String algorithm) {
            this.algorithm = algorithm;
            return this;
        }

        public String getCiphertext() {
            return ciphertext;
        }

        public Resource setCiphertext(String ciphertext) {
            this.ciphertext = ciphertext;
            return this;
        }

        public String getNonce() {
            return nonce;
        }

        public Resource setNonce(String nonce) {
            this.nonce = nonce;
            return this;
        }

        public String getOriginal_type() {
            return original_type;
        }

        public Resource setOriginal_type(String original_type) {
            this.original_type = original_type;
            return this;
        }

        public String getAssociated_data() {
            return associated_data;
        }

        public Resource setAssociated_data(String associated_data) {
            this.associated_data = associated_data;
            return this;
        }
    }
}
